package message;

import thread.ClientAtServerThread;

import java.io.Serializable;

/**
 * 基础报文类,序列化进行传输
 *
 * @author 张紘溢
 */

public abstract class BaseMessage implements Serializable {
    protected ClientAtServerThread sender = null;
    protected ClientAtServerThread accepter = null;

    public void setSender(ClientAtServerThread sender) {
        this.sender = sender;
    }

    /**
     * 服务端接收后运行此方法,用于向目标发送报文.
     */
    public abstract void sendToServer();

    /**
     * 客户端接收后运行此方法,用于更改客户端界面.
     */
    public abstract void selfExecute();

}
